#include "rectangle.h"

// see rectangle.h
Rectangle::Rectangle(int length, int width) {
    this->l = length;
    this->w = width;
}

// see rectangle.h
void Rectangle::area(void) {
    double area = this->l * this->w;
    cout << "\nArea of a rectangle is (" << this->l << " * " << this->w << ") = " << area;
}

// see rectangle.h
void Rectangle::perimeter(void) {
    double perimeter = 2 * (this->l + this->w);
    cout << "\nPerimeter of a rectangle is 2 * (" << this->l << " + " << this->w << ") = " << perimeter;
}

// see rectangle.h
void Rectangle::volume(void) {
    cout << "\nVolume is not defined for a rectangle.";
}